main: Use macro to reduce duplication among builtin prototypes
authorColin Walters <walters@verbum.org>
Mon, 19 Aug 2013 13:00:02 +0000 (09:00 -0400)
committerColin Walters <walters@verbum.org>
Mon, 19 Aug 2013 14:32:08 +0000 (10:32 -0400)
Just less code.

src/ostree/ot-builtins.h

index 4fbb4c17ae70c28ac6992ae900ab30aaf3a10da2..2231150e0014fbf38473f648657dea240dfb56c6 100644 (file)
 
 G_BEGIN_DECLS
 
-gboolean ostree_builtin_admin (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_cat (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_config (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_checkout (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_checksum (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_commit (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_diff (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_init (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_log (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_pull (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_pull_local (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_ls (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_prune (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_refs (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_reset (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_fsck (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_show (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_rev_parse (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_remote (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_write_refs (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
-gboolean ostree_builtin_trivial_httpd (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
+#define BUILTINPROTO(name) gboolean ostree_builtin_ ## name (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error)
+
+BUILTINPROTO(admin);
+BUILTINPROTO(cat);
+BUILTINPROTO(config);
+BUILTINPROTO(checkout);
+BUILTINPROTO(checksum);
+BUILTINPROTO(commit);
+BUILTINPROTO(diff);
+BUILTINPROTO(init);
+BUILTINPROTO(log);
+BUILTINPROTO(pull);
+BUILTINPROTO(pull_local);
+BUILTINPROTO(ls);
+BUILTINPROTO(prune);
+BUILTINPROTO(refs);
+BUILTINPROTO(reset);
+BUILTINPROTO(fsck);
+BUILTINPROTO(show);
+BUILTINPROTO(rev_parse);
+BUILTINPROTO(remote);
+BUILTINPROTO(write_refs);
+BUILTINPROTO(trivial_httpd);
+
+#undef BUILTINPROTO
 
 G_END_DECLS